home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / DDJ9205.ARJ / BOX.C < prev    next >
Text File  |  1992-04-22  |  816b  |  29 lines

  1. /* ----------- box.c ------------ */
  2.  
  3. #include "dflat.h"
  4.  
  5. int BoxProc(WINDOW wnd, MESSAGE msg, PARAM p1, PARAM p2)
  6. {
  7.     int rtn;
  8.     CTLWINDOW *ct = GetControl(wnd);
  9.     if (ct != NULL)    {
  10.         switch (msg)    {
  11.             case SETFOCUS:
  12.             case PAINT:
  13.                 return FALSE;
  14.             case LEFT_BUTTON:
  15.             case BUTTON_RELEASED:
  16.                 return SendMessage(GetParent(wnd), msg, p1, p2);
  17.             case BORDER:
  18.                 rtn = BaseWndProc(BOX, wnd, msg, p1, p2);
  19.                 if (ct != NULL)
  20.                     if (ct->itext != NULL)
  21.                         writeline(wnd, ct->itext, 1, 0, FALSE);
  22.                 return rtn;
  23.             default:
  24.                 break;
  25.         }
  26.     }
  27.     return BaseWndProc(BOX, wnd, msg, p1, p2);
  28. }
  29.